/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ModuloBaseDelConocimiento;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author rayner
 */
@Entity
@Table(name = "SintomaOSigno")
@NamedQueries({
    @NamedQuery(name = "SintomaOSigno.findAll", query = "SELECT s FROM SintomaOSigno s"),
    @NamedQuery(name = "SintomaOSigno.findById", query = "SELECT s FROM SintomaOSigno s WHERE s.id = :id"),
    @NamedQuery(name = "SintomaOSigno.findByNombre", query = "SELECT s FROM SintomaOSigno s WHERE s.nombre = :nombre"),
    @NamedQuery(name = "SintomaOSigno.findByDescripcion", query = "SELECT s FROM SintomaOSigno s WHERE s.descripcion = :descripcion"),
    @NamedQuery(name = "SintomaOSigno.findByPresente", query = "SELECT s FROM SintomaOSigno s WHERE s.presente = :presente")})
public class SintomaOSigno implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "nombre")
    private String nombre;
    @Column(name = "descripcion")
    private String descripcion;
    @Column(name = "presente")
    private Boolean presente;
    @JoinColumn(name = "Caso_id", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Caso caso;

    public SintomaOSigno() {
    }

    public SintomaOSigno(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public Boolean getPresente() {
        return presente;
    }

    public void setPresente(Boolean presente) {
        this.presente = presente;
    }

    public Caso getCaso() {
        return caso;
    }

    public void setCaso(Caso caso) {
        this.caso = caso;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SintomaOSigno)) {
            return false;
        }
        SintomaOSigno other = (SintomaOSigno) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ModuloBaseDelConocimiento.SintomaOSigno[id=" + id + "]";
    }

}
